home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / WaveTableList.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  6.0 KB  |  159 lines  |  [TEXT/KAHL]

  1. /* WaveTableList.h */
  2.  
  3. #ifndef Included_WaveTableList_h
  4. #define Included_WaveTableList_h
  5.  
  6. /* WaveTableList module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Screen */
  12. /* EventLoop */
  13. /* StringList */
  14. /* Array */
  15. /* Memory */
  16. /* Alert */
  17. /* DataMunging */
  18. /* WaveTableObject */
  19. /* SampleConsts */
  20. /* FixedPoint */
  21. /* MainWindowStuff */
  22. /* BufferedFileInput */
  23. /* BufferedFileOutput */
  24. /* Files */
  25. /* Scrap */
  26.  
  27. #include "Screen.h"
  28. #include "EventLoop.h"
  29. #include "SampleConsts.h"
  30. #include "FixedPoint.h"
  31. #include "MainWindowStuff.h"
  32.  
  33. struct WaveTableListRec;
  34. typedef struct WaveTableListRec WaveTableListRec;
  35.  
  36. /* forward declarations */
  37. struct MainWindowRec;
  38. struct CodeCenterRec;
  39. struct WaveTableObjectRec;
  40. struct BufferedInputRec;
  41. struct BufferedOutputRec;
  42. struct FileType;
  43.  
  44. /* create a new wave table list */
  45. WaveTableListRec*        NewWaveTableList(struct MainWindowRec* MainWindow,
  46.                                             struct CodeCenterRec* CodeCenter, WinType* ScreenID,
  47.                                             OrdType XLoc, OrdType YLoc, OrdType Width, OrdType Height);
  48.  
  49. /* delete the wave table list and all of the wave tables it contains */
  50. void                                DisposeWaveTableList(WaveTableListRec* WaveTableList);
  51.  
  52. /* change the location of the wave table list in the window */
  53. void                                SetWaveTableListLocation(WaveTableListRec* WaveTableList,
  54.                                             OrdType XLoc, OrdType YLoc, OrdType Width, OrdType Height);
  55.  
  56. /* redraw the wave table list */
  57. void                                WaveTableListRedraw(WaveTableListRec* WaveTableList);
  58.  
  59. /* see if the specified coordinates falls inside the wave table list rectangle */
  60. MyBoolean                        WaveTableListHitTest(WaveTableListRec* WaveTableList,
  61.                                             OrdType XLoc, OrdType YLoc);
  62.  
  63. /* handle a mouse down event for the wave table list */
  64. void                                WaveTableListDoMouseDown(WaveTableListRec* WaveTableList,
  65.                                             OrdType XLoc, OrdType YLoc, ModifierFlags Modifiers);
  66.  
  67. /* called when the window becomes active */
  68. void                                WaveTableListBecomeActive(WaveTableListRec* WaveTableList);
  69.  
  70. /* called when the window becomes inactive */
  71. void                                WaveTableListBecomeInactive(WaveTableListRec* WaveTableList);
  72.  
  73. /* called when a selection is made in another list, so that this list */
  74. /* is deselected */
  75. void                                WaveTableListDeselect(WaveTableListRec* WaveTableList);
  76.  
  77. /* check to see if there is a selection in this list */
  78. MyBoolean                        WaveTableListIsThereSelection(WaveTableListRec* WaveTableList);
  79.  
  80. /* check to see if any of the wave tables contained in this list need to be saved */
  81. MyBoolean                        DoesWaveTableListNeedToBeSaved(WaveTableListRec* WaveTableList);
  82.  
  83. /* open an edit window for the selected wave table */
  84. void                                WaveTableListOpenSelection(WaveTableListRec* WaveTableList);
  85.  
  86. /* create a new wave table and open a window for it */
  87. void                                WaveTableListNewWaveTable(WaveTableListRec* WaveTableList);
  88.  
  89. /* delete the selected wave table */
  90. void                                WaveTableListDeleteSelection(WaveTableListRec* WaveTableList);
  91.  
  92. /* delete the explicitly specified wave table */
  93. void                                WaveTableListDeleteWaveTable(WaveTableListRec* WaveTableList,
  94.                                             struct WaveTableObjectRec* TheWaveTable);
  95.  
  96. /* the name of a wave table has changed, so the name in the scrolling */
  97. /* list must also be changed */
  98. void                                WaveTableListWaveTableNameChanged(WaveTableListRec* WaveTableList,
  99.                                             struct WaveTableObjectRec* TheWaveTable);
  100.  
  101. /* look for a specified wave table.  returns NIL if not found.  the name is NOT null */
  102. /* terminated */
  103. struct WaveTableObjectRec*    WaveTableListLookupNamedWaveTable(
  104.                                             WaveTableListRec* WaveTableList, char* Name);
  105.  
  106. /* the document's name changed, so the windows need to be updated */
  107. void                                WaveTableListGlobalNameChange(WaveTableListRec* WaveTableList,
  108.                                             char* NewFilename);
  109.  
  110. /* use the provided data to open a new wave table with the specified attributes. */
  111. /* this is used when opening an algorithmic wave table as a data wave table. */
  112. /* RawData MUST be valid. */
  113. struct WaveTableObjectRec*    WaveTableListCopyRawWaveTableAndOpen(
  114.                                             WaveTableListRec* WaveTableList, char* RawData,
  115.                                             NumBitsType NumBits, long NumTables, long FramesPerTable);
  116.  
  117. /* get the frame count for the named wave table */
  118. SampleErrors                WaveTableListGetWaveTableFrameCount(WaveTableListRec* WaveTableList,
  119.                                             char* WaveName, long* FrameCountOut);
  120.  
  121. /* get the table count for the named wave table */
  122. SampleErrors                WaveTableListGetWaveTableTableCount(WaveTableListRec* WaveTableList,
  123.                                             char* WaveName, long* TableCountOut);
  124.  
  125. /* get the table array for the named wave table */
  126. SampleErrors                WaveTableListGetWaveTableArray(WaveTableListRec* WaveTableList,
  127.                                             char* WaveName, largefixedsigned** TableOut);
  128.  
  129. /* read wave table objects from a file.  returns True if completely successful. */
  130. FileLoadingErrors        WaveTableListReadData(WaveTableListRec* WaveTableList,
  131.                                             struct BufferedInputRec* Input);
  132.  
  133. /* write wave table objects to a file.  returns True if completely successful. */
  134. FileLoadingErrors        WaveTableListWriteData(WaveTableListRec* WaveTableList,
  135.                                             struct BufferedOutputRec* Output);
  136.  
  137. /* after a file has been saved, this is called to mark all objects as not modified. */
  138. void                                WaveTableListMarkAllObjectsSaved(WaveTableListRec* WaveTableList);
  139.  
  140. /* copy the selected object in the list to the clipboard.  return False if failed. */
  141. MyBoolean                        WaveTableListCopyObject(WaveTableListRec* WaveTableList);
  142.  
  143. /* try to paste the clipboard in as a wave table object.  returns False if */
  144. /* it failed or the clipboard did not contain a wave table object. */
  145. MyBoolean                        WaveTableListPasteObject(WaveTableListRec* WaveTableList);
  146.  
  147. /* try to paste the wave table object in from the file */
  148. MyBoolean                        WaveTableListPasteFromFile(WaveTableListRec* WaveTableList,
  149.                                             struct FileType* File);
  150.  
  151. /* find out how many wave tables there are in this list */
  152. long                                WaveTableListHowMany(WaveTableListRec* WaveTableList);
  153.  
  154. /* get an indexed wave tables from the list */
  155. struct WaveTableObjectRec*    WaveTableListGetIndexedWaveTable(
  156.                                             WaveTableListRec* WaveTableList, long Index);
  157.  
  158. #endif
  159.